<template>
  <div class="dtImg">
    <van-image :src="datas.image1">
      <template v-slot:loading>
        <van-loading type="spinner" size="20" />
      </template>
    </van-image>
    <div class="dtImg_content">
      <!-- <p>{{name}}</p>
      <p>
        价格:
        <span>{{price | toFixed | rmb}}</span>
      </p> -->
      <p>{{datas.name}}</p>
      <p>
        价格:
        <span>{{price | toFixed | rmb}}元</span>
      </p>
    </div>
  </div>
</template>

<script>
export default {
  props:{
    price:{
      type:Number,
      required:true,
      default:0
    }
  },
  data(){
    return{
      datas:{}
    }
  },
  created(){
    this.$eventBus.$on("getDetailGoodsInfo",res=>{
      //console.log(res)
      this.datas = res
    })
  }
};
</script>

<style>
p{
  font-size: 16px;
}
</style>